﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using BioBooking.Data;

namespace BioBooking.Data
{
    [ServiceContract]
    public interface IRepository
    {
        [OperationContract]
        List<Movie> GetMoviesByShowingsDate(DateTime date);

        [OperationContract]
        List<Showing> GetShowsFromShowtime(int movieID);

        [OperationContract]
        Movie GetMovieByID(int movieID);

        [OperationContract]
        Showing GetShow(int showingID);

        [OperationContract]
        List<Movie> ListAllActiveMovies();

        [OperationContract]
        void InsertMovie(string titel, DateTime releaseDate, string instructor, string actors, string originalTitle, string country, string language, string description, Int32 runtime, Genre genre);

        [OperationContract]
        void InsertMovieObject(Movie movie);

        [OperationContract]
        void UpdateMovie(int key, string titel, DateTime releaseDate, string instructor, string actors, string originalTitle, string country, string language, string description, Int32 runtime, Genre genre);

        [OperationContract]
        void UpdateMovieObject(Movie movie);

        [OperationContract]
        void DeleteMovie(Movie movie);

        [OperationContract]
        void CreateBooking(Showing show, Member member, List<Seat> seats, bool paymentReceived = false);

        [OperationContract]
        void DeleteBooking(Booking booking);

        [OperationContract]
        void UpdateBooking(Booking booking);

        [OperationContract]
        bool ReserveSeats(List<Seat> seats, Showing showing);

        [OperationContract]
        void RefreshLockedSeats();

        [OperationContract]
        List<Genre> GetAllGenres();

        [OperationContract]
        List<Cinema> GetCinemas();

        [OperationContract]
        void CreateShowingObject(Showing showing);

        [OperationContract]
        void CreateShowing(DateTime startTime, DateTime endTime, decimal unitPrice, DateTime date, Movie movie, Cinema cinema);

        [OperationContract]
        Movie GetMovieFromShowing(Showing show);

        [OperationContract]
        List<Showing> GetAllShowings();

        [OperationContract]
        List<Member> ListAllMembers();

        [OperationContract]
        void CreateMemberObject(Member member);

        [OperationContract]
        void UpdateMemberObject(Member member);

        [OperationContract]
        void SetDiscount(bool discount, int memberID);

        [OperationContract]
        void SetCounter(Int32 counter, int memberID);
    }
}
